<template>
	<view class="list">
		<view class="item" v-for="item,index in selectedLst" :key="index" @tap="toDetails(item.id)">
			<view class="img">
				<image :src="item.goods_big_logo" mode="widthFix"></image>
			</view>
			<view class="content">
				<view class="name">{{item.name}}
				</view>
				<view class="info">
					<text>￥{{item.price}}</text>
					<text class="tag">精选</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
const prop =defineProps(["selectedLst"])
</script>

<style>
	.list {
		margin: 5px;
		padding: 5px;
		border: 1px solid #ccc;
	}
	.list>.item {
		border: 1px solid #ddd;
		background-color: #fff;
		padding: 15rpx;
		box-sizing: border-box;
		display: flex;
 
		border-radius: 10rpx;
		box-shadow: 3px 3px 3px #ccc;
		margin-top: 10rpx;
		width: 700rpx;
	 

	}

	.list>.item>.img {
		width: 200rpx;
		height: 200rpx;
		padding: 3px;
		border: 1px solid #ddd;
	}

	.list>.item>.img>image {
		width: 100%;
		height: 100%;
	}

	.list>.item>.content {
		width: 500rpx;
		margin-top: 5rpx;
		margin-left: 5px;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}

	.list>.item>.content>.name {
		color: #666;
		font-size: 25rpx;
		margin: 8rpx 0;
		/* 下面的样式设置显示两行超出用省略号表示 */
		overflow: hidden;
		-webkit-line-clamp: 2;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;

	}

	.list>.item>.content>.info {
		display: flex;
		justify-content: space-between;
	}

	.list>.item>.content>.info>text:nth-child(1) {
		color: #f33;
		font-size: 30rpx;

	}

	.list>.item>.content .tag {
		background-color: #ff6700;
		padding: 5rpx 8rpx;
		color: #fff;
		font-size: 25rpx;
		border-radius: 6rpx;
	}
</style>